@extends('layouts.default') @section('main')
<link rel="stylesheet" href="/css/uniform.css" />
<link rel="stylesheet" href="/css/select2.css" />
<div id="content">
  <div id="content-header">
    <div id="breadcrumb">
        <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
        <a href="#" class="current">用户管理</a> </div>
  </div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
      	<a href="{{url('user/create')}}"><button class="btn">新增</button></a>
        <div class="widget-box">
          <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
            <h5>会员管理</h5>
          </div>
          <div class="widget-content nopadding">
            <table class="table table-bordered table-striped">
              <thead>
                <tr>
                  <th>昵称</th>
                  <th>用户名</th>
                  <th>角色名</th>
                  <th>来源</th>
                  <th>注册时间</th>
                  <th>最后登录时间</th>
                  <th>访问数</th>
                  <th>状态</th>
                  <th>是否推荐</th>
                  <th>用户详情</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
              	@foreach($users as $key => $user)
                <tr class="gradeX">
                  <td>{{$user->nickname}}</td>
                  <td>{{$user->username}}</td>
                  <td>@if($user->name==null)角色未知@else{{$user->name}}@endif</td>
                  <td>{{$user->source}}</td>
                  <td>{{date('Y-m-d',$user->reg_time)}}</td>
                  <td>{{date('Y-m-d',$user->last_time)}}</td>
                  <td>{{$user->login_count}}</td>
                  <td>@if($user->status == 1)正常@else禁用@endif</td>
                  <td>@if($user->recommend == 1)是@else否@endif</td>
                  <td><a href="{{ url('user/info?id='.$user->uid) }}">点击查看</a></td>
                  <td class="center"> 
	                  <a data-original-title="编辑" class="tip" href="{{url('user/edit?id='.$user->uid)}}"><i class="icon-pencil"></i></a>
                  </td>
                </tr>
                @endforeach
              </tbody>
            </table>
          </div>
        </div><?php echo $users->render();?>
      </div>
    </div>
  </div>
</div>
<script src="/js/matrix.tables.js"></script>
@stop
